using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class DL_PlanningMap : EntityTypeConfiguration<DL_Planning>
    {
        public DL_PlanningMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.Action)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("DL_Planning");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.PlanID).HasColumnName("PlanID");
            this.Property(t => t.Action).HasColumnName("Action");
            this.Property(t => t.DeliveryDate).HasColumnName("DeliveryDate");
            this.Property(t => t.Status).HasColumnName("Status");
            this.Property(t => t.Note).HasColumnName("Note");
            this.Property(t => t.RequiredDate).HasColumnName("RequiredDate");
        }
    }
}
